package oa.hleast.xswl.service.store;

import com.baomidou.mybatisplus.extension.service.IService;
import oa.hleast.xswl.pojo.domain.store.StoreInfo;
import oa.hleast.xswl.pojo.dto.store.StoreInfoDto;
import oa.hleast.xswl.pojo.form.store.OpenShopForm;
import oa.hleast.xswl.pojo.form.store.StoreInfoForm;
import oa.hleast.xswl.pojo.form.store.StoreRegisteredForm;
import oa.hleast.xswl.pojo.vo.store.BaseStoreInfo;

/**
 * @author: 302
 * @date: 2021-10-16 14:56:15
 * @description: 商家信息表(StoreInfo)接口
 */
public interface StoreInfoService extends IService<StoreInfo> {

    /**
     * 商家注册
     */
    Boolean registered(StoreRegisteredForm form, Integer registeredSource);

    /**
     * 商家注册 pc端
     */
    Boolean registeredByPC(StoreRegisteredForm form);

    /**
     * 商家注册 移动端商家端
     */
    Boolean registeredByApp(StoreRegisteredForm form);

    /**
     * 商家注册 代理注册
     */
    Boolean registeredByProxy(StoreRegisteredForm form);

    /**
     * 店铺关店 清空所有商品
     */
    Boolean closeShop(String id);

    /**
     * 审核通过
     *
     * @return
     */
    boolean reviewPass(Long id, Long userId);

    /**
     * 审核驳回
     *
     * @param userId
     * @param storeId
     * @param remark
     * @return
     */
    boolean reviewNotPass(Long userId, Long storeId, String remark);


    /**
     * 店铺及支付基本信息
     */
    StoreInfoDto getStoreInfoDtoById(Long id);

    /**
     * 修改部分商家信息
     *
     * @param body
     * @return
     */
    boolean updateStoreInfo(StoreInfoForm body);

    /**
     * 店铺及商品信息
     *
     * @param id 店铺ID
     */
    BaseStoreInfo baseInfo(Long id);

    /**
     * 开店
     *
     * @param form
     * @return
     */
    Boolean openShop(OpenShopForm form);
}
